#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <unordered_map>
#include <vector>
#include <set>
#include <queue>

using namespace std;
using LL = long long;
using PII = pair<int, int>;

const LL mod = 998244353, N = 2e5 + 10;

LL n, p;
LL f[N];

LL qmi(LL a, LL b, LL p){
    LL res = 1;
    while(b){
        if(b & 1) res = res * a % p;

        b >>= 1;
        a = a * a % p;
    }

    return res % p;
}

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    cin >> n >> p;
    f[0] = 0, f[1] = 1;
    LL p1 = p * qmi(100, mod - 2, mod) % mod, p2 = (1 - p1 + mod) % mod;
    for(int i = 2; i <= n; i ++){
        f[i] = (1 + f[i - 1] * p2 + f[i - 2] * p1) % mod;
        f[i] = f[i] % mod;
    }

    cout << f[n] << '\n';


    return 0;
}